using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Threading;

namespace Adoor.Wizard
{
    public partial class FormTable : Form
    {
        public FormTable()
        {
            InitializeComponent();
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            
            DataTable.AcceptChanges();
        }

        private DataTable dataTable;

        public DataTable DataTable
        {
            get { return dataTable; }
            set 
            { 
                dataTable = value;
                dataGridView1.DataSource = value;
            }
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            DataTable.AcceptChanges();
            DialogResult = DialogResult.OK;
            Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DataTable.RejectChanges();
            DialogResult = DialogResult.Cancel;
            Close();
        }

    }
}